package com.zsrt.java.day20161226.xww.demo3.demo2;

import java.util.Scanner;

public class Compare {

	public static void demo2(int a,int b){
		
		boolean result=a>b;
		if(result){
			int temp = a; 
			a = b; 
			b = temp;
			System.out.println("a:"+a+"b:"+b);
		}else{
			System.out.println("a:"+a+"b:"+b);
		}
	}
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入第一个数a：");
		int a=sc.nextInt();
		System.out.println("请输入第二个数b：");
		int b=sc.nextInt();
		demo2(a,b);
		sc.close();
		
	}
}
